@extends('admin.layout.layout')
@section('content')   
<div class="row">
<div class="col-lg-12">
    <h1 class="page-header">用户添加</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!--                 用户添加列表                                   -->
<div class="row">
<div class="col-lg-12">
    <div class="panel panel-default">
        <div class="panel-heading">
            图片修改
        </div>
        <div class="panel-body">
            <div class="row">
         
                <div class="col-lg-6 col-lg-offset-3">
                    <form role="form"  action="{{url('/admin/photo/update')}}" method="post" enctype="multipart/form-data">                
                      <input type="hidden" name="id" value="{{ $photo->id }}">
                        <div class="form-group">
                            <label>用户ID:{{$photo->uid}}</label>
                        </div>
                        <div class="form-group">
                            <label>图片名</label>
                            <input class="form-control" name="pname" value="{{$photo->pname}}" type="text">
                        </div>

                        <div class="form-group">
                            <label>相册</label>
                         
                            <select name="pid" class="form-control">
                                    @foreach($cates as $k=>$v)
                                        @if($v->id == $photo->pid)
                                            <option value="{{$v->id}}" selected>{{$v->pname}}</option>
                                        @else
                                            <option value="{{$v->id}}">{{$v->pname}}</option> 
                                        @endif      
                                    @endforeach
                                </select>
                        </div>
            
                        {{csrf_field()}}
                        <button type="submit" class="btn btn-primary btn-lg btn-block">修改提交</button>    
                    </form>   
                </div>
                <!-- /.col-lg-6 (nested) -->
            </div>
            <!-- /.row (nested) -->
        </div>
        <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>
@endsection